 <div class="box_top top_nomination">
 <h2 class="label_top">Top Video</h2>
 <ul class="list_video">
        <?php
            $modelR = new RemoveCircumflex();
            foreach($this->list as $item):
         ?>
         <li><a href="/<?php echo $modelR->rewrite($item['name']);?>/detail/<?php echo $item['id']?>-<?php echo $modelR->rewrite($item['title_vi']);?>.html">
            <img src="<?php echo $item['thumb']?>"/>
            <span>
                <h3 class="title_video"><?php echo $item['title_vi']?></h3>
                <p><?php echo $item['national']?> | Lượt xem: <?php echo $item['hits']?></p>
            </span>
            <div class="clear"></div>
         </a></li>
         <?php
            endforeach;
          ?>
    </ul>
    <div id="loading"></div>
 </div>
<script>
$(document).ready(function(){
    $(window).scroll(function(){
        console.log($(window).scrollTop() +' -- '+$(window).height()+' -- '+$(document).height());
            if ($(window).scrollTop()+ $(window).height() == $(document).height()){
            	loadScroll();
            }
    });
});
function loadScroll(){
    var lastPos = $(".list_video li").size();
    $("#loading").html('<img src="/images/sys/loading.gif"/>');
    $("#loading img").fadeIn('fast');
    $.post("/mobile/index/load-scroll",{'lastPos': lastPos}, function(data){
        $("#loading img").fadeOut('fast');
        $("#loading").empty();
        $(".list_video").append(data);
    })
}
</script>